using Microsoft.Practices.Unity;
using UnityProvider;

namespace UnityDemo.LoggingUtility
{
    public static class LogerInstance
    {
        private static ILogger _logger;

        public static ILogger Logger
        {
            get { return _logger; }
        }

        public static void InitializeLogger(LoggerType loggerType)
        {
            switch (loggerType)
            {
                case LoggerType.Console:
                    UnityInstanceProvider.ApplicationWideUnityInstance.RegisterType<ILogger, ConsoleLogger>();

                    break;

                case LoggerType.WPF:
                    //UnityInstanceProvider.ApplicationWideUnityInstance.RegisterType<ILogger, ConsoleLogger>();
                    break;
            }
            _logger = UnityInstanceProvider.ApplicationWideUnityInstance.Resolve<ILogger>();
        }
    }
}